//主色调





$lightGray: #f6f6f6;
$yellow:#ffb400;
$green:#00bc00;
$orange:#ff7800;


$black: #333;
$white: #fff;
$blue: #007fff;
$fontgray:#71777c;
$line :#f1f1f1;
$shadow: #e2e0e0;
$gray: #999;
$red: #e70000;
$maingray:#f4f5f5;



$mainWidth:960px;//主體寬度
$headerHeight:60px;//頭部寬度
// 背景图片地址和大小
@mixin backgroundImage($url) {
    background-image: url($url);
    background-repeat: no-repeat;
    background-size: contain;
}

@mixin borderRadius($radius) {
    -webkit-border-radius: $radius;
    -moz-border-radius: $radius;
    -ms-border-radius: $radius;
    -o-border-radius: $radius;
    border-radius: $radius;
}

//定位全屏
@mixin allcover {
    position: absolute;
    top: 0;
    right: 0;
}

//定位上下左右居中
@mixin center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

//定位上下居中
@mixin ct {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

//定位左右居中
@mixin cl {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

//宽高
@mixin wh($width, $height) {
    width: $width;
    height: $height;
}

//字体大小，颜色
@mixin sc($size, $color) {
    font-size: $size;
    color: $color;
}

//flex 布局和 子元素 对其方式
@mixin fj($type: space-between) {
    display: flex;
    justify-content: $type;
}


//1px 下 border 的实现
@mixin border_1px_b($color) {
    position: relative;
    &:after {
        display: block;
        position: absolute;
        left: 0;
        bottom: 0;
        width: 100%;
        border-bottom: 1px solid $color;
        content: '';
    }
    @media screen and (-webkit-min-device-pixel-ratio: 1) {
        position: relative;
        &:after {
            display: block;
            position: absolute;
            left: 0;
            bottom: 0;
            width: 100%;
            border-bottom: 1px solid $color;
            content: '';
        }
    }
    @media screen and (-webkit-min-device-pixel-ratio: 2) {
        position: relative;
        &:after {
            display: block;
            position: absolute;
            left: 0;
            bottom: 0;
            width: 100%;
            border-bottom: 1px solid $color;
            content: '';
            -webkit-transform: scaleY(0.5);
            transform: scaleY(0.5);
        }
    }
    @media screen and (-webkit-min-device-pixel-ratio: 3) {
        position: relative;
        &:after {
            display: block;
            position: absolute;
            left: 0;
            bottom: 0;
            width: 100%;
            border-bottom: 1px solid $color;
            content: '';
            -webkit-transform: scaleY(0.3);
            transform: scaleY(0.3);
        }
    }
}




//1px 上 border 的实现
@mixin border_1px_t($color) {
    position: relative;
    &:before {
        display: block;
        position: absolute;
        left: 0;
        bottom: 0;
        width: 100%;
        border-bottom: 1px solid $color;
        content: '';
    }
    @media screen and (-webkit-min-device-pixel-ratio: 1) {
        position: relative;
        &:before {
            display: block;
            position: absolute;
            left: 0;
            bottom: 0;
            width: 100%;
            border-bottom: 1px solid $color;
            content: '';
        }
    }
    @media screen and (-webkit-min-device-pixel-ratio: 2) {
        position: relative;
        &:before {
            display: block;
            position: absolute;
            left: 0;
            bottom: 0;
            width: 100%;
            border-bottom: 1px solid $color;
            content: '';
            -webkit-transform: scaleY(0.5);
            transform: scaleY(0.5);
        }
    }
    @media screen and (-webkit-min-device-pixel-ratio: 3) {
        position: relative;
        &:before {
            display: block;
            position: absolute;
            left: 0;
            bottom: 0;
            width: 100%;
            border-bottom: 1px solid $color;
            content: '';
            -webkit-transform: scaleY(0.3);
            transform: scaleY(0.3);
        }
    }
}